Closed
Bug 1366882
Opened 8 years ago
Closed 8 years ago
Fix some resource leaks
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox-esr52 wontfix, firefox53 wontfix, firefox54 wontfix, firefox55 fixed)
RESOLVED
FIXED
mozilla55
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, memory-leak, Whiteboard: [CID 1213977][CID 1401664][CID 1401662][CID 1401661][CID 1402588])
Attachments
(4 files)
No description provided.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
![]() |
||
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8870172 [details]
hg logBug 1366882 - fix resource leaks CID 1401664 1401662 1401661
https://reviewboard.mozilla.org/r/141612/#review145286
This works, but it would be even better if you changed each |pb| to a |UniquePtr<ProfileBuffer>|, and then the explicit |delete| statements wouldn't be necessary. r=me with that. Thanks!
Attachment #8870172 -
Flags: review?(n.nethercote) → review+
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8870170 [details]
Bug 1366882 - Fix a resource leak - CID 1402588
https://reviewboard.mozilla.org/r/141608/#review145292
::: extensions/auth/nsHttpNegotiateAuth.cpp:548
(Diff revision 1)
> //
> nsresult rv =
> Base64Decode(challenge, len, (char**)&inToken, &inTokenLen);
>
> if (NS_FAILED(rv)) {
> + free(inToken);
In the failed case `inToken` can point to invalid memory, we don't want to free it. `Base64Decode` will only set the buffer on success [1].
[1] http://searchfox.org/mozilla-central/rev/6c2dbacbba1d58b8679cee700fd0a54189e0cf1b/xpcom/io/Base64.cpp#439
Attachment #8870170 -
Flags: review?(erahm) → review-
![]() |
||
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8870171 [details]
Bug 1366882 - Fix a resource leak - CID 1213977 -
https://reviewboard.mozilla.org/r/141610/#review145520
Attachment #8870171 -
Flags: review?(nfroyd) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 12•8 years ago
|
||
mozreview-review |
Comment on attachment 8870170 [details]
Bug 1366882 - Fix a resource leak - CID 1402588
https://reviewboard.mozilla.org/r/141608/#review146106
Looks good.
Attachment #8870170 -
Flags: review?(erahm) → review+
Comment 13•8 years ago
|
||
mozreview-review |
Comment on attachment 8870178 [details]
Bug 1366882 - Fix a resource leak - CID 221217 -
https://reviewboard.mozilla.org/r/141618/#review150876
Attachment #8870178 -
Flags: review?(ted) → review+
Comment 14•8 years ago
|
||
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/021d3649e2fc
Fix a resource leak - CID 1402588 r=erahm
https://hg.mozilla.org/integration/autoland/rev/365687db6288
Fix a resource leak - CID 1213977 - r=froydnj
https://hg.mozilla.org/integration/autoland/rev/2ec004b70daa
hg logBug 1366882 - fix resource leaks CID 1401664 1401662 1401661 r=njn
https://hg.mozilla.org/integration/autoland/rev/4b380c4484ba
Fix a resource leak - CID 221217 - r=ted
Comment 15•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 16•8 years ago
|
||
bugherder |
Updated•8 years ago
|
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•